#ifndef _PLUGINITEM_H_
#define _PLUGINITEM_H_

#include "stdafx.h"

class CPlugins
{
public:
	CPlugins(void);
	~CPlugins(void);
public:
	HRESULT LoadMemory(LPCSTR pMemory);
	DWORD	GetClsidCount();
	DWORD	GetCompentsCount();
	DWORD	LoadCompents(ComponentPlugin& mapCompents);
	DWORD	LoadClsidAll(PluginVector& vecPlugins);
	DWORD	LoadClsid(PluginVector& vecPlugins,const char* pComponents);
private:
	JsonSafePtr			m_pJson;
	CharArrayPtr		m_pdata;
	PluginVector		m_SortVecPlugins;
	ComponentPlugin		m_mapComponents;
private:
	HRESULT LoadPluginModule(const cJSON* JsRoot);
	HRESULT LoadPluginItem(const cJSON* JsRoot);
	HRESULT GetItemString(const cJSON* JsRoot,const char* id,char** pItem);


};

#endif
